3.9.41 \(\int \frac {(A+B x) \sqrt {a+b x+c x^2}}{x^2} \, dx\)

Optimal. Leaf size=121 \[ -\frac {(A-B x) \sqrt {a+b x+c x^2}}{x}-\frac {(2 a B+A b) \tanh ^{-1}\left (\frac {2 a+b x}{2 \sqrt {a} \sqrt {a+b x+c x^2}}\right )}{2 \sqrt {a}}+\frac {(2 A c+b B) \tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{2 \sqrt {c}} \]

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 121, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {812, 843, 621, 206, 724} \begin {gather*} -\frac {(A-B x) \sqrt {a+b x+c x^2}}{x}-\frac {(2 a B+A b) \tanh ^{-1}\left (\frac {2 a+b x}{2 \sqrt {a} \sqrt {a+b x+c x^2}}\right )}{2 \sqrt {a}}+\frac {(2 A c+b B) \tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{2 \sqrt {c}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((A + B*x)*Sqrt[a + b*x + c*x^2])/x^2,x]

[Out]

-(((A - B*x)*Sqrt[a + b*x + c*x^2])/x) - ((A*b + 2*a*B)*ArcTanh[(2*a + b*x)/(2*Sqrt[a]*Sqrt[a + b*x + c*x^2])]
)/(2*Sqrt[a]) + ((b*B + 2*A*c)*ArcTanh[(b + 2*c*x)/(2*Sqrt[c]*Sqrt[a + b*x + c*x^2])])/(2*Sqrt[c])

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 621

Int[1/Sqrt[(a_) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[2, Subst[Int[1/(4*c - x^2), x], x, (b + 2*c*x)
/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 724

Int[1/(((d_.) + (e_.)*(x_))*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]), x_Symbol] :> Dist[-2, Subst[Int[1/(4*c*d
^2 - 4*b*d*e + 4*a*e^2 - x^2), x], x, (2*a*e - b*d - (2*c*d - b*e)*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a,
b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[2*c*d - b*e, 0]

Rule 812

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Sim
p[((d + e*x)^(m + 1)*(e*f*(m + 2*p + 2) - d*g*(2*p + 1) + e*g*(m + 1)*x)*(a + b*x + c*x^2)^p)/(e^2*(m + 1)*(m
+ 2*p + 2)), x] + Dist[p/(e^2*(m + 1)*(m + 2*p + 2)), Int[(d + e*x)^(m + 1)*(a + b*x + c*x^2)^(p - 1)*Simp[g*(
b*d + 2*a*e + 2*a*e*m + 2*b*d*p) - f*b*e*(m + 2*p + 2) + (g*(2*c*d + b*e + b*e*m + 4*c*d*p) - 2*c*e*f*(m + 2*p
 + 2))*x, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2
, 0] && RationalQ[p] && p > 0 && (LtQ[m, -1] || EqQ[p, 1] || (IntegerQ[p] &&  !RationalQ[m])) && NeQ[m, -1] &&
  !ILtQ[m + 2*p + 1, 0] && (IntegerQ[m] || IntegerQ[p] || IntegersQ[2*m, 2*p])

Rule 843

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Dis
t[g/e, Int[(d + e*x)^(m + 1)*(a + b*x + c*x^2)^p, x], x] + Dist[(e*f - d*g)/e, Int[(d + e*x)^m*(a + b*x + c*x^
2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0]
&&  !IGtQ[m, 0]

Rubi steps

\begin {align*} \int \frac {(A+B x) \sqrt {a+b x+c x^2}}{x^2} \, dx &=-\frac {(A-B x) \sqrt {a+b x+c x^2}}{x}-\frac {1}{2} \int \frac {-A b-2 a B-(b B+2 A c) x}{x \sqrt {a+b x+c x^2}} \, dx\\ &=-\frac {(A-B x) \sqrt {a+b x+c x^2}}{x}-\frac {1}{2} (-A b-2 a B) \int \frac {1}{x \sqrt {a+b x+c x^2}} \, dx-\frac {1}{2} (-b B-2 A c) \int \frac {1}{\sqrt {a+b x+c x^2}} \, dx\\ &=-\frac {(A-B x) \sqrt {a+b x+c x^2}}{x}-(A b+2 a B) \operatorname {Subst}\left (\int \frac {1}{4 a-x^2} \, dx,x,\frac {2 a+b x}{\sqrt {a+b x+c x^2}}\right )-(-b B-2 A c) \operatorname {Subst}\left (\int \frac {1}{4 c-x^2} \, dx,x,\frac {b+2 c x}{\sqrt {a+b x+c x^2}}\right )\\ &=-\frac {(A-B x) \sqrt {a+b x+c x^2}}{x}-\frac {(A b+2 a B) \tanh ^{-1}\left (\frac {2 a+b x}{2 \sqrt {a} \sqrt {a+b x+c x^2}}\right )}{2 \sqrt {a}}+\frac {(b B+2 A c) \tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{2 \sqrt {c}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.17, size = 118, normalized size = 0.98 \begin {gather*} \frac {(B x-A) \sqrt {a+x (b+c x)}}{x}-\frac {(2 a B+A b) \tanh ^{-1}\left (\frac {2 a+b x}{2 \sqrt {a} \sqrt {a+x (b+c x)}}\right )}{2 \sqrt {a}}+\frac {(2 A c+b B) \tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+x (b+c x)}}\right )}{2 \sqrt {c}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((A + B*x)*Sqrt[a + b*x + c*x^2])/x^2,x]

[Out]

((-A + B*x)*Sqrt[a + x*(b + c*x)])/x - ((A*b + 2*a*B)*ArcTanh[(2*a + b*x)/(2*Sqrt[a]*Sqrt[a + x*(b + c*x)])])/
(2*Sqrt[a]) + ((b*B + 2*A*c)*ArcTanh[(b + 2*c*x)/(2*Sqrt[c]*Sqrt[a + x*(b + c*x)])])/(2*Sqrt[c])

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.54, size = 117, normalized size = 0.97 \begin {gather*} \frac {(B x-A) \sqrt {a+b x+c x^2}}{x}+\frac {(-2 A c-b B) \log \left (-2 \sqrt {c} \sqrt {a+b x+c x^2}+b+2 c x\right )}{2 \sqrt {c}}+\frac {(-2 a B-A b) \tanh ^{-1}\left (\frac {\sqrt {a+b x+c x^2}-\sqrt {c} x}{\sqrt {a}}\right )}{\sqrt {a}} \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[((A + B*x)*Sqrt[a + b*x + c*x^2])/x^2,x]

[Out]

((-A + B*x)*Sqrt[a + b*x + c*x^2])/x + ((-(A*b) - 2*a*B)*ArcTanh[(-(Sqrt[c]*x) + Sqrt[a + b*x + c*x^2])/Sqrt[a
]])/Sqrt[a] + ((-(b*B) - 2*A*c)*Log[b + 2*c*x - 2*Sqrt[c]*Sqrt[a + b*x + c*x^2]])/(2*Sqrt[c])

________________________________________________________________________________________

fricas [A]  time = 0.91, size = 648, normalized size = 5.36 \begin {gather*} \left [\frac {{\left (2 \, B a + A b\right )} \sqrt {a} c x \log \left (-\frac {8 \, a b x + {\left (b^{2} + 4 \, a c\right )} x^{2} - 4 \, \sqrt {c x^{2} + b x + a} {\left (b x + 2 \, a\right )} \sqrt {a} + 8 \, a^{2}}{x^{2}}\right ) + {\left (B a b + 2 \, A a c\right )} \sqrt {c} x \log \left (-8 \, c^{2} x^{2} - 8 \, b c x - b^{2} - 4 \, \sqrt {c x^{2} + b x + a} {\left (2 \, c x + b\right )} \sqrt {c} - 4 \, a c\right ) + 4 \, {\left (B a c x - A a c\right )} \sqrt {c x^{2} + b x + a}}{4 \, a c x}, \frac {{\left (2 \, B a + A b\right )} \sqrt {a} c x \log \left (-\frac {8 \, a b x + {\left (b^{2} + 4 \, a c\right )} x^{2} - 4 \, \sqrt {c x^{2} + b x + a} {\left (b x + 2 \, a\right )} \sqrt {a} + 8 \, a^{2}}{x^{2}}\right ) - 2 \, {\left (B a b + 2 \, A a c\right )} \sqrt {-c} x \arctan \left (\frac {\sqrt {c x^{2} + b x + a} {\left (2 \, c x + b\right )} \sqrt {-c}}{2 \, {\left (c^{2} x^{2} + b c x + a c\right )}}\right ) + 4 \, {\left (B a c x - A a c\right )} \sqrt {c x^{2} + b x + a}}{4 \, a c x}, \frac {2 \, {\left (2 \, B a + A b\right )} \sqrt {-a} c x \arctan \left (\frac {\sqrt {c x^{2} + b x + a} {\left (b x + 2 \, a\right )} \sqrt {-a}}{2 \, {\left (a c x^{2} + a b x + a^{2}\right )}}\right ) + {\left (B a b + 2 \, A a c\right )} \sqrt {c} x \log \left (-8 \, c^{2} x^{2} - 8 \, b c x - b^{2} - 4 \, \sqrt {c x^{2} + b x + a} {\left (2 \, c x + b\right )} \sqrt {c} - 4 \, a c\right ) + 4 \, {\left (B a c x - A a c\right )} \sqrt {c x^{2} + b x + a}}{4 \, a c x}, \frac {{\left (2 \, B a + A b\right )} \sqrt {-a} c x \arctan \left (\frac {\sqrt {c x^{2} + b x + a} {\left (b x + 2 \, a\right )} \sqrt {-a}}{2 \, {\left (a c x^{2} + a b x + a^{2}\right )}}\right ) - {\left (B a b + 2 \, A a c\right )} \sqrt {-c} x \arctan \left (\frac {\sqrt {c x^{2} + b x + a} {\left (2 \, c x + b\right )} \sqrt {-c}}{2 \, {\left (c^{2} x^{2} + b c x + a c\right )}}\right ) + 2 \, {\left (B a c x - A a c\right )} \sqrt {c x^{2} + b x + a}}{2 \, a c x}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(c*x^2+b*x+a)^(1/2)/x^2,x, algorithm="fricas")

[Out]

[1/4*((2*B*a + A*b)*sqrt(a)*c*x*log(-(8*a*b*x + (b^2 + 4*a*c)*x^2 - 4*sqrt(c*x^2 + b*x + a)*(b*x + 2*a)*sqrt(a
) + 8*a^2)/x^2) + (B*a*b + 2*A*a*c)*sqrt(c)*x*log(-8*c^2*x^2 - 8*b*c*x - b^2 - 4*sqrt(c*x^2 + b*x + a)*(2*c*x
+ b)*sqrt(c) - 4*a*c) + 4*(B*a*c*x - A*a*c)*sqrt(c*x^2 + b*x + a))/(a*c*x), 1/4*((2*B*a + A*b)*sqrt(a)*c*x*log
(-(8*a*b*x + (b^2 + 4*a*c)*x^2 - 4*sqrt(c*x^2 + b*x + a)*(b*x + 2*a)*sqrt(a) + 8*a^2)/x^2) - 2*(B*a*b + 2*A*a*
c)*sqrt(-c)*x*arctan(1/2*sqrt(c*x^2 + b*x + a)*(2*c*x + b)*sqrt(-c)/(c^2*x^2 + b*c*x + a*c)) + 4*(B*a*c*x - A*
a*c)*sqrt(c*x^2 + b*x + a))/(a*c*x), 1/4*(2*(2*B*a + A*b)*sqrt(-a)*c*x*arctan(1/2*sqrt(c*x^2 + b*x + a)*(b*x +
 2*a)*sqrt(-a)/(a*c*x^2 + a*b*x + a^2)) + (B*a*b + 2*A*a*c)*sqrt(c)*x*log(-8*c^2*x^2 - 8*b*c*x - b^2 - 4*sqrt(
c*x^2 + b*x + a)*(2*c*x + b)*sqrt(c) - 4*a*c) + 4*(B*a*c*x - A*a*c)*sqrt(c*x^2 + b*x + a))/(a*c*x), 1/2*((2*B*
a + A*b)*sqrt(-a)*c*x*arctan(1/2*sqrt(c*x^2 + b*x + a)*(b*x + 2*a)*sqrt(-a)/(a*c*x^2 + a*b*x + a^2)) - (B*a*b
+ 2*A*a*c)*sqrt(-c)*x*arctan(1/2*sqrt(c*x^2 + b*x + a)*(2*c*x + b)*sqrt(-c)/(c^2*x^2 + b*c*x + a*c)) + 2*(B*a*
c*x - A*a*c)*sqrt(c*x^2 + b*x + a))/(a*c*x)]

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(c*x^2+b*x+a)^(1/2)/x^2,x, algorithm="giac")

[Out]

Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,x):;OUTPUT:Unab
le to divide, perhaps due to rounding error%%%{2,[4,4,0]%%%}+%%%{%%%{-16,[1]%%%},[4,2,1]%%%}+%%%{%%%{32,[2]%%%
},[4,0,2]%%%}+%%%{-4,[2,4,1]%%%}+%%%{%%%{32,[1]%%%},[2,2,2]%%%}+%%%{%%%{-64,[2]%%%},[2,0,3]%%%}+%%%{2,[0,4,2]%
%%}+%%%{%%%{-16,[1]%%%},[0,2,3]%%%}+%%%{%%%{32,[2]%%%},[0,0,4]%%%} / %%%{4,[4,0,0]%%%}+%%%{-8,[2,0,1]%%%}+%%%{
4,[0,0,2]%%%} Error: Bad Argument Value

________________________________________________________________________________________

maple [B]  time = 0.08, size = 207, normalized size = 1.71 \begin {gather*} -\frac {A b \ln \left (\frac {b x +2 a +2 \sqrt {c \,x^{2}+b x +a}\, \sqrt {a}}{x}\right )}{2 \sqrt {a}}+A \sqrt {c}\, \ln \left (\frac {c x +\frac {b}{2}}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )-B \sqrt {a}\, \ln \left (\frac {b x +2 a +2 \sqrt {c \,x^{2}+b x +a}\, \sqrt {a}}{x}\right )+\frac {B b \ln \left (\frac {c x +\frac {b}{2}}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{2 \sqrt {c}}+\frac {\sqrt {c \,x^{2}+b x +a}\, A c x}{a}+\frac {\sqrt {c \,x^{2}+b x +a}\, A b}{a}+\sqrt {c \,x^{2}+b x +a}\, B -\frac {\left (c \,x^{2}+b x +a \right )^{\frac {3}{2}} A}{a x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)*(c*x^2+b*x+a)^(1/2)/x^2,x)

[Out]

-A/a/x*(c*x^2+b*x+a)^(3/2)+A/a*b*(c*x^2+b*x+a)^(1/2)-1/2*A/a^(1/2)*b*ln((b*x+2*a+2*(c*x^2+b*x+a)^(1/2)*a^(1/2)
)/x)+A*c/a*(c*x^2+b*x+a)^(1/2)*x+A*c^(1/2)*ln((c*x+1/2*b)/c^(1/2)+(c*x^2+b*x+a)^(1/2))+B*(c*x^2+b*x+a)^(1/2)+1
/2*B*b*ln((c*x+1/2*b)/c^(1/2)+(c*x^2+b*x+a)^(1/2))/c^(1/2)-B*a^(1/2)*ln((b*x+2*a+2*(c*x^2+b*x+a)^(1/2)*a^(1/2)
)/x)

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(c*x^2+b*x+a)^(1/2)/x^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*a*c-b^2>0)', see `assume?` f
or more details)Is 4*a*c-b^2 positive, negative or zero?

________________________________________________________________________________________

mupad [B]  time = 1.56, size = 166, normalized size = 1.37 \begin {gather*} B\,\sqrt {c\,x^2+b\,x+a}-\frac {A\,\sqrt {c\,x^2+b\,x+a}}{x}-B\,\sqrt {a}\,\ln \left (\frac {b}{2}+\frac {a}{x}+\frac {\sqrt {a}\,\sqrt {c\,x^2+b\,x+a}}{x}\right )+A\,\sqrt {c}\,\ln \left (\frac {\frac {b}{2}+c\,x}{\sqrt {c}}+\sqrt {c\,x^2+b\,x+a}\right )+\frac {B\,b\,\ln \left (\frac {\frac {b}{2}+c\,x}{\sqrt {c}}+\sqrt {c\,x^2+b\,x+a}\right )}{2\,\sqrt {c}}-\frac {A\,b\,\ln \left (\frac {b}{2}+\frac {a}{x}+\frac {\sqrt {a}\,\sqrt {c\,x^2+b\,x+a}}{x}\right )}{2\,\sqrt {a}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + B*x)*(a + b*x + c*x^2)^(1/2))/x^2,x)

[Out]

B*(a + b*x + c*x^2)^(1/2) - (A*(a + b*x + c*x^2)^(1/2))/x - B*a^(1/2)*log(b/2 + a/x + (a^(1/2)*(a + b*x + c*x^
2)^(1/2))/x) + A*c^(1/2)*log((b/2 + c*x)/c^(1/2) + (a + b*x + c*x^2)^(1/2)) + (B*b*log((b/2 + c*x)/c^(1/2) + (
a + b*x + c*x^2)^(1/2)))/(2*c^(1/2)) - (A*b*log(b/2 + a/x + (a^(1/2)*(a + b*x + c*x^2)^(1/2))/x))/(2*a^(1/2))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (A + B x\right ) \sqrt {a + b x + c x^{2}}}{x^{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(c*x**2+b*x+a)**(1/2)/x**2,x)

[Out]

Integral((A + B*x)*sqrt(a + b*x + c*x**2)/x**2, x)

________________________________________________________________________________________